# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from django.conf.urls.defaults import *
from smartwebnote.models import *

urlpatterns = patterns('',
    # Example:
    # (r'^foo/', include('foo.urls')),
)
note = {
	'model': Note,
	'template_name': 'smartwebnote/note_fckeditor.html',
	'post_save_redirect': '/',
}

note_delete = {
	'model': Note,
	'template_name': 'smartwebnote/note_confirm_delete.html',
	'post_delete_redirect': '/',
}


urlpatterns = patterns('smartwebnote.views',
	(r'^$', 'anonymous_list'),
	(r'^signout/$', 'signout'),
	(r'^list/$', 'list'),
	(r'^create/$', 'create', note),
	(r'^delete/(?P<object_key>[^/]+)/$', 'delete', note_delete),
	(r'^edit/(?P<object_key>[^/]+)/$', 'edit', note),
	(r'^save/(?P<object_key>[^/]+)/$', 'save', note),	
	(r'^xml/list/$', 'xmllist'),
	(r'^xml/edit/(?P<object_key>[^/]+)/$', 'xmledit', {'model':Note}),	
	(r'^xml/create/$', 'xmlcreate', {'model':Note}),	
)

